package com.example.chesstest;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

public class MainMenu extends Activity implements OnClickListener {

	Button play, achiv, tp, help;
	TextView playT;
	String myString;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu);

		play = (Button) findViewById(R.id.bPlay);
		achiv = (Button) findViewById(R.id.bAchiv);
		tp = (Button) findViewById(R.id.bTopPlayer);
		help = (Button) findViewById(R.id.bHelp);
		playT = (TextView) findViewById(R.id.tvTorn);
		play.setOnClickListener(this);
		achiv.setOnClickListener(this);
		tp.setOnClickListener(this);
		help.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.bPlay:
			try {
				playT.setText("Player 1");

			} catch (Exception e) {
				e.printStackTrace();
			}
			Intent playIt = new Intent("com.example.chesstest.GAME");
			startActivity(playIt);
			break;
		}
	}

}
